package com.manner.groupon.controller.staff;

import com.manner.groupon.common.BaseResponse;
import com.manner.groupon.model.dto.grouponCoupons.CouponPackageDTO;
import com.manner.groupon.service.groupon.GroupPurchasePackageService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: Manner
 * @Description: 平台内部员工对团购券套餐操作请求控制器
 * @DateTime: 2024/11/10 16:12
 */
@RestController("staffCouponPackageController")
@RequestMapping("/staff/groupon-package")
@RequiredArgsConstructor
public class CouponPackageController {

    private final GroupPurchasePackageService groupPurchasePackageService;

    /**
     * @param couponPackageDTO
     * @return BaseResponse<String>
     * @description: 内部员工增加配置团购券的套餐内容
     * @author Manner
     * @date 2024/11/10 16:18
     */
    @PutMapping("/add")
    public BaseResponse<String> staffConfigureGrouponCouponsPackage(@RequestBody CouponPackageDTO couponPackageDTO) {
        return groupPurchasePackageService.savePackage(couponPackageDTO);
    }
}
